Skip to content

fix: mark inconclusive rounds as rewards_done to prevent queue leak#79

Merged
jcabrero merged 2 commits intomainfrom
fix/inconclusive-round-leak
Apr 8, 2026
Merged

fix: mark inconclusive rounds as rewards_done to prevent queue leak#79
jcabrero merged 2 commits intomainfrom
fix/inconclusive-round-leak

Conversation

@jcabrero
Copy link
Copy Markdown
Member

@jcabrero jcabrero commented Apr 8, 2026

Summary

  • Rounds with outcome=0 (Inconclusive) were collected into the reward jobs queue every tick but silently skipped during processing, without ever setting rewards_done = true
  • This caused them to accumulate indefinitely — observed growing from 4 to 299 pending jobs over a week in sandbox, wasting CPU and memory cloning member vectors every 5-second tick
  • Fix: mark inconclusive rounds as rewards_done = true at collection time so they are excluded from future ticks

Rounds with outcome=0 (Inconclusive) were collected into the reward
jobs queue but silently skipped during processing without ever setting
rewards_done=true. This caused them to accumulate indefinitely,
wasting CPU and memory every tick.
@jcabrero jcabrero force-pushed the fix/inconclusive-round-leak branch from b6c7b8d to 4e45467 Compare April 8, 2026 12:26
Extract collect_round_jobs into a standalone function and add 5 unit
tests covering inconclusive rounds, conclusive rounds, jailing policy,
and already-processed rounds.
@jcabrero jcabrero merged commit dc3b5c6 into main Apr 8, 2026
1 check passed
@jcabrero jcabrero deleted the fix/inconclusive-round-leak branch April 8, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant